package com.sai.homework;

public abstract class AbstractPackage {
    private double cost;

    public AbstractPackage() {
    }

    public AbstractPackage(double cost) {
       setCost(cost);
    }

    public double getCost() {
        return cost;
    }

    public void setCost(double cost) {
        if (cost > 0) {
        this.cost = cost;
        }else {
            System.out.println("资费值不合理哦!");
        }
    }
    public abstract void show();
}
